//
//  FXCyclePagerViewCell.m
//  FXKitExampleDemo
//
//  Created by sunjinshuai on 2017/8/14.
//  Copyright © 2017年 com.51fanxing. All rights reserved.
//

#import "FXCyclePagerViewCell.h"

@interface FXCyclePagerViewCell ()

@property (nonatomic, weak) UILabel *label;

@end
@implementation FXCyclePagerViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor clearColor];
        [self addLabel];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {
        self.backgroundColor = [UIColor clearColor];
        [self addLabel];
    }
    return self;
}


- (void)addLabel {
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 10, self.width / 3, 20)];
    label.textAlignment = 1;
    label.textColor = [Networking colorWithHexString:@"#6A8FA6"];
    label.font = [UIFont fontWithName:PingFangSCRegular size:12];
    label.text = @"产量";
    
    UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(label.right, 10, self.width / 3, 20)];
    label1.textAlignment = 1;
    label1.textColor = [Networking colorWithHexString:@"#6A8FA6"];
    label1.font = [UIFont fontWithName:PingFangSCRegular size:12];
    label1.text = @"平均产量";
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(label1.right, 10, self.width / 3, 20)];
    label2.textAlignment = 1;
    label2.textColor = [Networking colorWithHexString:@"#6A8FA6"];
    label2.font = [UIFont fontWithName:PingFangSCRegular size:12];
    label2.text = @"最高产量";
    
    UILabel *label3 = [[UILabel alloc]initWithFrame:CGRectMake(0, label.bottom + 10, self.width / 3, 20)];
    label3.textAlignment = 1;
    label3.textColor = [Networking colorWithHexString:@"#93B5CF"];
    label3.font = [UIFont fontWithName:PingFangSCMedium size:20];
    
    UILabel *label4 = [[UILabel alloc]initWithFrame:CGRectMake(label.right,label1.bottom +  10, self.width / 3, 20)];
    label4.textAlignment = 1;
    label4.textColor = [Networking colorWithHexString:@"#93B5CF"];
    label4.font = [UIFont fontWithName:PingFangSCMedium size:20];
    
    UILabel *label5 = [[UILabel alloc]initWithFrame:CGRectMake(label1.right, label2.bottom + 10, self.width / 3, 20)];
    label5.textAlignment = 1;
    label5.textColor = [Networking colorWithHexString:@"#93B5CF"];
    label5.font = [UIFont fontWithName:PingFangSCMedium size:20];
    
    UILabel *label6 = [[UILabel alloc]initWithFrame:CGRectMake(0, label3.bottom + 10, self.width / 3, 20)];
    label6.textAlignment = 1;
    label6.textColor = [Networking colorWithHexString:@"#00C3A2"];
    label6.font = [UIFont fontWithName:PingFangSCMedium size:12];
    
    
    UILabel *label7 = [[UILabel alloc]initWithFrame:CGRectMake(label.right,label3.bottom +  10, self.width / 3, 20)];
    label7.textAlignment = 1;
    label7.textColor = [Networking colorWithHexString:@"#409EFF"];
    label7.font = [UIFont fontWithName:PingFangSCMedium size:12];
    
    UILabel *label8 = [[UILabel alloc]initWithFrame:CGRectMake(label1.right, label3.bottom + 10, self.width / 3, 20)];
    label8.textAlignment = 1;
    label8.textColor = [Networking colorWithHexString:@"#7467D0"];
    label8.font = [UIFont fontWithName:PingFangSCMedium size:12];

    [self addSubview:label];
    [self addSubview:label1];
    [self addSubview:label2];
    [self addSubview:label3];
    [self addSubview:label4];
    [self addSubview:label5];
    [self addSubview:label6];
    [self addSubview:label7];
    [self addSubview:label8];

    _label = label;
    _label1 = label1;
    _label2 = label2;
    _label3 = label3;
    _label4 = label4;
    _label5 = label5;
    _label6 = label6;
    _label7 = label7;
    _label8 = label8;

}

- (void)layoutSubviews {
    [super layoutSubviews];
//    _label.frame = self.bounds;
}

@end
